.class Lcom/xingbook/group/view/i;
.super Ljava/lang/Object;

# interfaces
.implements Landroid/text/TextWatcher;


# instance fields
.field a:I

.field b:I

.field c:Ljava/util/ArrayList;

.field final synthetic d:Lcom/xingbook/group/view/PublishRelativeLayout;


# direct methods
.method constructor <init>(Lcom/xingbook/group/view/PublishRelativeLayout;)V
    .locals 2

    const/4 v0, 0x0

    iput-object p1, p0, Lcom/xingbook/group/view/i;->d:Lcom/xingbook/group/view/PublishRelativeLayout;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput v0, p0, Lcom/xingbook/group/view/i;->a:I

    iput v0, p0, Lcom/xingbook/group/view/i;->b:I

    new-instance v0, Ljava/util/ArrayList;

    const/4 v1, 0x3

    invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V

    iput-object v0, p0, Lcom/xingbook/group/view/i;->c:Ljava/util/ArrayList;

    return-void
.end method


# virtual methods
.method public afterTextChanged(Landroid/text/Editable;)V
    .locals 3

    iget v0, p0, Lcom/xingbook/group/view/i;->a:I

    if-lez v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    iget v1, p0, Lcom/xingbook/group/view/i;->a:I

    if-lt v0, v1, :cond_1

    iget-object v0, p0, Lcom/xingbook/group/view/i;->c:Ljava/util/ArrayList;

    new-instance v1, Lcom/xingbook/group/view/j;

    invoke-direct {v1, p0}, Lcom/xingbook/group/view/j;-><init>(Lcom/xingbook/group/view/i;)V

    invoke-static {v0, v1}, Ljava/util/Collections;->sort(Ljava/util/List;Ljava/util/Comparator;)V

    iget-object v0, p0, Lcom/xingbook/group/view/i;->c:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :goto_1
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-nez v0, :cond_3

    iget-object v0, p0, Lcom/xingbook/group/view/i;->c:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    :cond_0
    return-void

    :cond_1
    iget v1, p0, Lcom/xingbook/group/view/i;->b:I

    add-int/2addr v1, v0

    invoke-interface {p1, v1}, Landroid/text/Editable;->charAt(I)C

    move-result v1

    invoke-static {v1}, Lcn/a/a/d/j;->a(C)Z

    move-result v1

    if-eqz v1, :cond_2

    iget-object v1, p0, Lcom/xingbook/group/view/i;->c:Ljava/util/ArrayList;

    iget v2, p0, Lcom/xingbook/group/view/i;->b:I

    add-int/2addr v2, v0

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    :cond_2
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    :cond_3
    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    add-int/lit8 v2, v0, 0x1

    invoke-interface {p1, v0, v2}, Landroid/text/Editable;->delete(II)Landroid/text/Editable;

    goto :goto_1
.end method

.method public beforeTextChanged(Ljava/lang/CharSequence;III)V
    .locals 0

    return-void
.end method

.method public onTextChanged(Ljava/lang/CharSequence;III)V
    .locals 0

    iput p4, p0, Lcom/xingbook/group/view/i;->a:I

    iput p2, p0, Lcom/xingbook/group/view/i;->b:I

    return-void
.end method
